package 笔试强训;

import java.util.Scanner;

public class _0416T1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double x = scanner.nextDouble();
        String s = scanner.next();
        int sum = 20;
        if(x>1) {
            while(x>1) {
                sum+=1;
                x--;
            }
        }
        if(s.equals("y")) {
            sum+=5;
        }
        System.out.println(sum);
    }
}
